package com.mach.platform.repository;

import com.mach.platform.domain.iot.IotDevType;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author Anonymous
 * @Description: 设备类型
 * @Package: com.mach.platform.repository
 * @time 2018/04/27 23:12
 */
@Repository
public interface IotDevTypeRepo extends BaseRepository<IotDevType>{

	/**
	 * 修改 设备类型实体的一个字段
	 *
	 * @param id
	 * @param picUrl
	 */
	@Modifying
	@Query(value = "update iot_dev_type set icon_url = ?2 where id=?1", nativeQuery = true)
	void updateIconUrl (Long id, String picUrl);

}
